#include "process.h"
#include <unistd.h>

double total = 1024.0;
double speed = 4.0;

void Download()
{
  double curr = 0.0;//当前下载量
  while(curr <= total)
  {
    FlushProcess(total, curr); //更新进度,按照下载进度来更新进度条
    curr += speed; //模拟下载行为
    usleep(30000);
  }
  printf("\n");
}

int main()
{
  Download();

  return 0;
}
